 {include file="index/head"/}
<div class="install-box">
    <fieldset class="layui-elem-field site-demo-button">
        <legend>用户协议 适用于所有用户</legend>
        <div class="protocol">
            
        </div>
    </fieldset>
    <div class="step-btns">
        <a href="#" class="layui-btn layui-btn-disabled layui-btn-big">系统安装中</a>
    </div>
</div>
 <script type="text/javascript">
	$(function () {
        install(0);
    });
	function install(id) {
		$.ajax({
			url: "{:url('install/index/updata')}",
			data: {id: id},
			dataType: 'json',
			type: 'get',
			success: function (data) {
				console.log(data);
				id++;
				if( data.data!='安装完成'){
					if(data.data)
					$(".protocol").append('<div class="layui-form-item"><div class="layui-form-mid layui-word-aux">'+data.data+'</div></div>');
					install(id);
				}else{
					$(".step-btns").html("<a href='{:url('user/login/login')}' class='layui-btn layui-btn-big'>进入首页</a>");
				}
				$(".protocol").scrollTop(10000000);
			},
			error: function () {
			},
			complete: function () {
			}
		});
	}
 </script>
 {include file="index/foot"/}